using System;
using System.IO;
using System.Diagnostics;
using System.Collections.Generic;

using Weazel.Math;

public class Display_directiveexpression23
{
    
    public virtual void Evaluate()
    {
      switch(Simulator.controller_euclid_ctl.CurrentControlStep)
      {
      case 0:
      case 6:
        Console.Write("sfg: init");
        Console.WriteLine();
        break;
      }
    }
    
    public virtual void Initialize()
    {
    }
}

public class Display_directiveexpression36
{
    
    public virtual void Evaluate()
    {
      switch(Simulator.controller_euclid_ctl.CurrentControlStep)
      {
      case 2:
      case 3:
      case 4:
      case 5:
        Console.Write("sfg: flags");
        Console.WriteLine();
        break;
      }
    }
    
    public virtual void Initialize()
    {
    }
}

public class Display_directiveexpression48
{
    
    // The constant value 1
    internal Integer Constant_1;
    
    // Used to evaluate expression: m >> 1
    internal Integer Value_binaryexpression47;
    
    public virtual void Evaluate()
    {
      switch(Simulator.controller_euclid_ctl.CurrentControlStep)
      {
      case 4:
      case 5:
        Console.Write("sfg: shiftm m >> 1: ");
        Integer.ShiftRight(ref this.Value_binaryexpression47, Simulator.register_euclid_m.StoredValue, this.Constant_1.ToInt());
        Console.Write(this.Value_binaryexpression47.ToHexadecimalString());
        Console.WriteLine();
        break;
      }
    }
    
    public virtual void Initialize()
    {
        this.Constant_1 = new Integer(2, "1", false);
        this.Value_binaryexpression47 = new Integer(16, false);
    }
}

public class Display_directiveexpression60
{
    
    // The constant value 1
    internal Integer Constant_1;
    
    // Used to evaluate expression: n >> 1
    internal Integer Value_binaryexpression59;
    
    public virtual void Evaluate()
    {
      switch(Simulator.controller_euclid_ctl.CurrentControlStep)
      {
      case 3:
      case 5:
        Console.Write("sfg: shiftm n >> 1: ");
        Integer.ShiftRight(ref this.Value_binaryexpression59, Simulator.register_euclid_n.StoredValue, this.Constant_1.ToInt());
        Console.Write(this.Value_binaryexpression59.ToHexadecimalString());
        Console.WriteLine();
        break;
      }
    }
    
    public virtual void Initialize()
    {
        this.Constant_1 = new Integer(2, "1", false);
        this.Value_binaryexpression59 = new Integer(16, false);
    }
}

public class Display_directiveexpression87
{
    
    // Used to evaluate expression: m >= n
    internal Integer Value_binaryexpression86;
    
    public virtual void Evaluate()
    {
      switch(Simulator.controller_euclid_ctl.CurrentControlStep)
      {
      case 2:
        Console.Write("sfg: reduce m >= n: ");
        if ((Simulator.register_euclid_m.StoredValue >= Simulator.register_euclid_n.StoredValue))
        {
            this.Value_binaryexpression86 = Integer.One;
        }
        else
        {
            this.Value_binaryexpression86 = Integer.Zero;
        }
        Console.Write(this.Value_binaryexpression86.ToHexadecimalString());
        Console.WriteLine();
        break;
      }
    }
    
    public virtual void Initialize()
    {
        this.Value_binaryexpression86 = new Integer(1, false);
    }
}

public class Display_directiveexpression96
{
    
    public virtual void Evaluate()
    {
      switch(Simulator.controller_euclid_ctl.CurrentControlStep)
      {
      case 5:
        Console.Write("sfg: shiftf");
        Console.WriteLine();
        break;
      }
    }
    
    public virtual void Initialize()
    {
    }
}

public class Display_directiveexpression103
{
    
    public virtual void Evaluate()
    {
      switch(Simulator.controller_euclid_ctl.CurrentControlStep)
      {
      case 0:
      case 2:
      case 3:
      case 4:
      case 5:
      case 6:
        Console.Write("sfg: outidle");
        Console.WriteLine();
        break;
      }
    }
    
    public virtual void Initialize()
    {
    }
}

public class Display_directiveexpression120
{
    
    public virtual void Evaluate()
    {
      switch(Simulator.controller_euclid_ctl.CurrentControlStep)
      {
      case 1:
        Console.Write("cycle=");
        Console.Write(Simulator.CurrentCycle);
        Console.Write(" gcd=");
        Debug.Assert((Simulator.outPort_euclid_gcd.Cycle == Simulator.CurrentCycle));
        Console.Write(Simulator.outPort_euclid_gcd.Value.ToHexadecimalString());
        Console.WriteLine();
        break;
      }
    }
    
    public virtual void Initialize()
    {
    }
}

public class Display_directiveexpression133
{
    
    public virtual void Evaluate()
    {
      switch(Simulator.controller_euclid_ctl.CurrentControlStep)
      {
      case 0:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        Console.Write(Simulator.CurrentCycle);
        Console.Write(" m: ");
        Console.Write(Simulator.register_euclid_m.StoredValue.ToDecimalString());
        Console.Write(" n: ");
        Console.Write(Simulator.register_euclid_n.StoredValue.ToDecimalString());
        Console.Write(" done: ");
        Console.Write(Simulator.register_euclid_done.StoredValue.ToDecimalString());
        Console.Write(" factor: ");
        Console.Write(Simulator.register_euclid_factor.StoredValue.ToDecimalString());
        Console.WriteLine();
        break;
      }
    }
    
    public virtual void Initialize()
    {
    }
}

